<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
</head>

<body>
  <script>
    // instanceof  判断当前数据的数据类型  引用数据类型
    // constructor 判断对象的构造器名称

    // in          判断对象是否含有某个属性
    // hasOwnProperty() 判断对象是否含有某个属性 只能判断内部属性 不能判断原型上的属性
    function Car(name, color) {
      this.name = name;
      this.color = color;
      this.run = function () { }
    }
    Car.prototype.lun = 4;
    Car.prototype.men = 8;
    var aotuo = new Car("奥拓", "黑色")
    console.log(aotuo.constructor === Car) //true
    console.log(aotuo instanceof Object)//true 
    console.log('color' in aotuo) //true 
    console.log(aotuo.hasOwnProperty('color'))//true

  </script>
</body>

</html>